package icooper.sinaweibo;

import android.content.Intent;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;

import android.os.Bundle;
import android.view.ViewGroup.LayoutParams;

import icooper.util.RequestCode;
import icooper.util.Tag;
import android.util.Log;
import android.graphics.Bitmap;

import android.net.http.SslError;
import android.webkit.SslErrorHandler;

public class SinaWebView extends android.app.Activity {
    
    private static String webUrl = "";
    
    public static void setWebUrl(String url) {
    	webUrl = url;
    }
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        LinearLayout linearLayout = new LinearLayout(this);
        WebView webView = new WebView(this);
        linearLayout.addView(webView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
        setContentView(linearLayout);

        WebSettings webSettings = webView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webSettings.setSupportZoom(true);
        webView.requestFocus();
        android.util.Log.d(Tag.sinaLog, "WebView open url[" + webUrl + "]");
        webView.loadUrl(webUrl);
    }

}

